import request from '@/utils/request'

// 查询组件信息列表
export function listComponent(query) {
    return request({
        url: '/party-manage/component/list',
        method: 'get',
        params: query
    })
}

// 查询组件信息详细
export function getComponent(ctId) {
    return request({
        url: '/party-manage/component/' + ctId,
        method: 'get'
    })
}

// 新增组件信息
export function addComponent(data) {
    return request({
        url: '/party-manage/component',
        method: 'post',
        data: data
    })
}

// 修改组件信息
export function updateComponent(data) {
    return request({
        url: '/party-manage/component/edit',
        method: 'post',
        data: data
    })
}

// 删除组件信息
export function delComponent(ctId) {
    return request({
        url: '/party-manage/component/delete/' + ctId,
        method: 'post'
    })
}

// 导出组件信息
export function exportComponent(query) {
    return request({
        url: '/party-manage/component/export',
        method: 'get',
        params: query
    })
}
